package com.gxa.eshop.exception;

/**
 * @author bill
 * @date 2022/8/11 14:38
 */


import com.gxa.eshop.enums.ErrorCode;

import java.io.Serializable;

/**
 * Created by bill on 2020/12/8
 **/
public class BusinessException extends Exception implements Serializable {
    private ErrorCode messageCode;
    public BusinessException(ErrorCode messageCode){
//给父类传递异常信息
        super(messageCode.getMessage());
        this.messageCode=messageCode;
    }
    public ErrorCode getMessageCode() {
        return messageCode;
    }
    public void setMessageCode(ErrorCode messageCode) {
        this.messageCode = messageCode;
    }
}